cmake_minimum_required(VERSION 3.10)
project(QTPCL)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)

find_package(
    VTK
    REQUIRED
)

find_package(
    PCL
    REQUIRED
)
find_package(
    Qt5
    REQUIRED
    COMPONENTS
    Core Widgets Gui
)

find_package(
    catkin
    REQUIRED
    COMPONENTS roscpp cv_bridge sensor_msgs 
)

find_package(
    OpenCV
    REQUIRED
)

include_directories(
  include
  ${PCL_INCLUDE_DIRS}
  ${VTK_INCLUDE_DIRS}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${vtkGUISupportQt_INCLUDE_DIRS}
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
)

add_executable(
    viewer
    src/main.cpp
    src/recorder.ui
    src/topic.ui
)

target_link_libraries(
    viewer
    ${catkin_LIBRARIES}
    ${PCL_LIBRARIES}
    ${VTK_LIBRARIES}
    ${OpenCV_LIBRARIES}
    ${vtkGUISupportQt_LIBRARIES}
    Qt5::Widgets
    Qt5::Core
    Qt5::Gui
)

